package com.eascs.crm.nsEditDetail.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.alibaba.dubbo.config.annotation.Reference;
import com.eascs.admin.common.controller.BaseMasterViewController;
import com.eascs.app.log.Logger;
import com.eascs.app.log.LoggerFactory;
import com.eascs.crm.nsEditDetail.entity.O2oMainShopInfoEntity;
import com.eascs.crm.nsEditDetail.service.IMainShopInfoService;
import com.eascs.site.view.ViewContext;

@Controller
@RequestMapping("/mainShopInfoView")
public class MainShopInfoViewController extends BaseMasterViewController {
	private final Logger logger = LoggerFactory.getLogger(MainShopInfoViewController.class);
	
	@Reference
	IMainShopInfoService mainShopInfoService;
	
	
	/**
	 * @Description:
	 *               <p>
	 *                查询经营主体信息
	 *               </p>
	 * @author LMX
	 */
	@RequestMapping(value = "/query_view", method = RequestMethod.GET)
	public String queryIndex(String loanapplyNo, String type, String approvalStatus) {
		logger.info("经营主体查询loanapplyNo：【{}】", loanapplyNo);
		O2oMainShopInfoEntity info = mainShopInfoService.getByLoanNo(loanapplyNo);
		O2oMainShopInfoEntity info_sensitive = mainShopInfoService.getByLoanNo_sensitive(loanapplyNo);//脱敏
		ViewContext.put("view", info);	
		ViewContext.put("view_sensitive", info_sensitive);	
		ViewContext.put("type", type);
		ViewContext.put("approvalStatus", approvalStatus);
		return "/nsEditDetail/main_shop_info_view";
	}
}
